using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VARRESULT
    {
        public DataRow Convert2ARRESULT(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryARRESULT(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["ARRMANDANT"] = " ".PadRight(2 ); 
         dwReturn["ARRAUFKRS"] = " ".PadRight(2 ); 
         dwReturn["ARRAUFLFD"] = " ".PadRight(6 ); 
         dwReturn["ARRAUFPOS"] = " ".PadRight(3 ); 
         dwReturn["ARRAFOLGE"] = " ".PadRight(3 ); 
         dwReturn["ARRTP"] = " ".PadRight(4 ); 
         dwReturn["ARRLFDNR"] = " ".PadRight(8 ); 
         dwReturn["ARRAENZL"] = " ".PadRight(0 ); 
         dwReturn["ARRAENB"] = " ".PadRight(8 ); 
         dwReturn["ARRAEND"] = " ".PadRight(0 ); 
         dwReturn["ARRNEUB"] = " ".PadRight(8 ); 
         dwReturn["ARRNEUD"] = " ".PadRight(0 ); 
         dwReturn["ARRKSTKRS"] = " ".PadRight(2 ); 
         dwReturn["ARRKST"] = " ".PadRight(4 ); 
         dwReturn["ARRPASS"] = " ".PadRight(1 ); 
         dwReturn["ARRSTOPSTA"] = " ".PadRight(2 ); 
         dwReturn["ARRSTOPGRD"] = " ".PadRight(3 ); 
         dwReturn["ARRCOMMENT"] = " ".PadRight(70 ); 
         dwReturn["ARRKUNDNR"] = " ".PadRight(8 ); 
         dwReturn["ARRWERK"] = " ".PadRight(3 ); 
         dwReturn["ARRABT"] = " ".PadRight(3 ); 
         dwReturn["ARRWAKZ"] = " ".PadRight(1 ); 
         dwReturn["ARRART"] = " ".PadRight(20 ); 
         dwReturn["ARRVAR"] = " ".PadRight(3 ); 
         dwReturn["ARRFARBE"] = " ".PadRight(10 ); 
         dwReturn["ARRLIART1"] = " ".PadRight(5 ); 
         dwReturn["ARRDELTAE1"] = " ".PadRight(0 ); 
         dwReturn["ARRDELTAL1"] = " ".PadRight(0 ); 
         dwReturn["ARRDELTAA1"] = " ".PadRight(0 ); 
         dwReturn["ARRDELTAB1"] = " ".PadRight(0 ); 
         dwReturn["ARRDELTAC1"] = " ".PadRight(0 ); 
         dwReturn["ARRDELTAH1"] = " ".PadRight(0 ); 
         dwReturn["ARRLIART2"] = " ".PadRight(5 ); 
         dwReturn["ARRDELTAE2"] = " ".PadRight(0 ); 
         dwReturn["ARRDELTAL2"] = " ".PadRight(0 ); 
         dwReturn["ARRDELTAA2"] = " ".PadRight(0 ); 
         dwReturn["ARRDELTAB2"] = " ".PadRight(0 ); 
         dwReturn["ARRDELTAC2"] = " ".PadRight(0 ); 
         dwReturn["ARRDELTAH2"] = " ".PadRight(0 ); 
         dwReturn["ARRLIART3"] = " ".PadRight(5 ); 
         dwReturn["ARRDELTAE3"] = " ".PadRight(0 ); 
         dwReturn["ARRDELTAL3"] = " ".PadRight(0 ); 
         dwReturn["ARRDELTAA3"] = " ".PadRight(0 ); 
         dwReturn["ARRDELTAB3"] = " ".PadRight(0 ); 
         dwReturn["ARRDELTAC3"] = " ".PadRight(0 ); 
         dwReturn["ARRDELTAH3"] = " ".PadRight(0 ); 
         dwReturn["ARRLIART4"] = " ".PadRight(5 ); 
         dwReturn["ARRDELTAE4"] = " ".PadRight(0 ); 
         dwReturn["ARRDELTAL4"] = " ".PadRight(0 ); 
         dwReturn["ARRDELTAA4"] = " ".PadRight(0 ); 
         dwReturn["ARRDELTAB4"] = " ".PadRight(0 ); 
         dwReturn["ARRDELTAC4"] = " ".PadRight(0 ); 
         dwReturn["ARRDELTAH4"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV400"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV410"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV420"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV430"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV440"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV450"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV460"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV470"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV480"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV490"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV500"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV510"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV520"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV530"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV540"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV550"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV560"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV570"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV580"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV590"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV600"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV610"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV620"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV630"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV640"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV650"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV660"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV670"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV680"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV690"] = " ".PadRight(0 ); 
         dwReturn["ARRREMV700"] = " ".PadRight(0 ); 
         dwReturn["ARRFILLER"] = " ".PadRight(124 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapARRESULT(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveARRESULT(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryARRESULT(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapARRESULT(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertARRESULT(dwLocal, ITXDBVERSION);
            }
            UpdateARRESULT(dwLocal);
        }
        public void InsertARRESULT(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO ARRESULT(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryARRESULT(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM ARRESULT WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM ARRESULT  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "ARRESULT";
            Return = Result;
            return Return;
        }
        public void DeleteARRESULT(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM ARRESULT   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateARRESULT(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE ARRESULT SET "
                    +"ARRMANDANT= :ARRMANDANT,"
                    +"ARRAUFKRS= :ARRAUFKRS,"
                    +"ARRAUFLFD= :ARRAUFLFD,"
                    +"ARRAUFPOS= :ARRAUFPOS,"
                    +"ARRAFOLGE= :ARRAFOLGE,"
                    +"ARRTP= :ARRTP,"
                    +"ARRLFDNR= :ARRLFDNR,"
                    +"ARRAENZL= :ARRAENZL,"
                    +"ARRAENB= :ARRAENB,"
                    +"ARRAEND= :ARRAEND,"
                    +"ARRNEUB= :ARRNEUB,"
                    +"ARRNEUD= :ARRNEUD,"
                    +"ARRKSTKRS= :ARRKSTKRS,"
                    +"ARRKST= :ARRKST,"
                    +"ARRPASS= :ARRPASS,"
                    +"ARRSTOPSTA= :ARRSTOPSTA,"
                    +"ARRSTOPGRD= :ARRSTOPGRD,"
                    +"ARRCOMMENT= :ARRCOMMENT,"
                    +"ARRKUNDNR= :ARRKUNDNR,"
                    +"ARRWERK= :ARRWERK,"
                    +"ARRABT= :ARRABT,"
                    +"ARRWAKZ= :ARRWAKZ,"
                    +"ARRART= :ARRART,"
                    +"ARRVAR= :ARRVAR,"
                    +"ARRFARBE= :ARRFARBE,"
                    +"ARRLIART1= :ARRLIART1,"
                    +"ARRDELTAE1= :ARRDELTAE1,"
                    +"ARRDELTAL1= :ARRDELTAL1,"
                    +"ARRDELTAA1= :ARRDELTAA1,"
                    +"ARRDELTAB1= :ARRDELTAB1,"
                    +"ARRDELTAC1= :ARRDELTAC1,"
                    +"ARRDELTAH1= :ARRDELTAH1,"
                    +"ARRLIART2= :ARRLIART2,"
                    +"ARRDELTAE2= :ARRDELTAE2,"
                    +"ARRDELTAL2= :ARRDELTAL2,"
                    +"ARRDELTAA2= :ARRDELTAA2,"
                    +"ARRDELTAB2= :ARRDELTAB2,"
                    +"ARRDELTAC2= :ARRDELTAC2,"
                    +"ARRDELTAH2= :ARRDELTAH2,"
                    +"ARRLIART3= :ARRLIART3,"
                    +"ARRDELTAE3= :ARRDELTAE3,"
                    +"ARRDELTAL3= :ARRDELTAL3,"
                    +"ARRDELTAA3= :ARRDELTAA3,"
                    +"ARRDELTAB3= :ARRDELTAB3,"
                    +"ARRDELTAC3= :ARRDELTAC3,"
                    +"ARRDELTAH3= :ARRDELTAH3,"
                    +"ARRLIART4= :ARRLIART4,"
                    +"ARRDELTAE4= :ARRDELTAE4,"
                    +"ARRDELTAL4= :ARRDELTAL4,"
                    +"ARRDELTAA4= :ARRDELTAA4,"
                    +"ARRDELTAB4= :ARRDELTAB4,"
                    +"ARRDELTAC4= :ARRDELTAC4,"
                    +"ARRDELTAH4= :ARRDELTAH4,"
                    +"ARRREMV400= :ARRREMV400,"
                    +"ARRREMV410= :ARRREMV410,"
                    +"ARRREMV420= :ARRREMV420,"
                    +"ARRREMV430= :ARRREMV430,"
                    +"ARRREMV440= :ARRREMV440,"
                    +"ARRREMV450= :ARRREMV450,"
                    +"ARRREMV460= :ARRREMV460,"
                    +"ARRREMV470= :ARRREMV470,"
                    +"ARRREMV480= :ARRREMV480,"
                    +"ARRREMV490= :ARRREMV490,"
                    +"ARRREMV500= :ARRREMV500,"
                    +"ARRREMV510= :ARRREMV510,"
                    +"ARRREMV520= :ARRREMV520,"
                    +"ARRREMV530= :ARRREMV530,"
                    +"ARRREMV540= :ARRREMV540,"
                    +"ARRREMV550= :ARRREMV550,"
                    +"ARRREMV560= :ARRREMV560,"
                    +"ARRREMV570= :ARRREMV570,"
                    +"ARRREMV580= :ARRREMV580,"
                    +"ARRREMV590= :ARRREMV590,"
                    +"ARRREMV600= :ARRREMV600,"
                    +"ARRREMV610= :ARRREMV610,"
                    +"ARRREMV620= :ARRREMV620,"
                    +"ARRREMV630= :ARRREMV630,"
                    +"ARRREMV640= :ARRREMV640,"
                    +"ARRREMV650= :ARRREMV650,"
                    +"ARRREMV660= :ARRREMV660,"
                    +"ARRREMV670= :ARRREMV670,"
                    +"ARRREMV680= :ARRREMV680,"
                    +"ARRREMV690= :ARRREMV690,"
                    +"ARRREMV700= :ARRREMV700,"
                    +"ARRFILLER= :ARRFILLER,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("ARRMANDANT", OracleType.NVarChar).Value = dwData["ARRMANDANT"].ToString(); 
          or1.Parameters.Add("ARRAUFKRS", OracleType.NVarChar).Value = dwData["ARRAUFKRS"].ToString(); 
          or1.Parameters.Add("ARRAUFLFD", OracleType.NVarChar).Value = dwData["ARRAUFLFD"].ToString(); 
          or1.Parameters.Add("ARRAUFPOS", OracleType.NVarChar).Value = dwData["ARRAUFPOS"].ToString(); 
          or1.Parameters.Add("ARRAFOLGE", OracleType.NVarChar).Value = dwData["ARRAFOLGE"].ToString(); 
          or1.Parameters.Add("ARRTP", OracleType.NVarChar).Value = dwData["ARRTP"].ToString(); 
          or1.Parameters.Add("ARRLFDNR", OracleType.NVarChar).Value = dwData["ARRLFDNR"].ToString(); 
          or1.Parameters.Add("ARRAENZL", OracleType.NVarChar).Value = dwData["ARRAENZL"].ToString(); 
          or1.Parameters.Add("ARRAENB", OracleType.NVarChar).Value = dwData["ARRAENB"].ToString(); 
          or1.Parameters.Add("ARRAEND", OracleType.NVarChar).Value = dwData["ARRAEND"].ToString(); 
          or1.Parameters.Add("ARRNEUB", OracleType.NVarChar).Value = dwData["ARRNEUB"].ToString(); 
          or1.Parameters.Add("ARRNEUD", OracleType.NVarChar).Value = dwData["ARRNEUD"].ToString(); 
          or1.Parameters.Add("ARRKSTKRS", OracleType.NVarChar).Value = dwData["ARRKSTKRS"].ToString(); 
          or1.Parameters.Add("ARRKST", OracleType.NVarChar).Value = dwData["ARRKST"].ToString(); 
          or1.Parameters.Add("ARRPASS", OracleType.NVarChar).Value = dwData["ARRPASS"].ToString(); 
          or1.Parameters.Add("ARRSTOPSTA", OracleType.NVarChar).Value = dwData["ARRSTOPSTA"].ToString(); 
          or1.Parameters.Add("ARRSTOPGRD", OracleType.NVarChar).Value = dwData["ARRSTOPGRD"].ToString(); 
          or1.Parameters.Add("ARRCOMMENT", OracleType.NVarChar).Value = dwData["ARRCOMMENT"].ToString(); 
          or1.Parameters.Add("ARRKUNDNR", OracleType.NVarChar).Value = dwData["ARRKUNDNR"].ToString(); 
          or1.Parameters.Add("ARRWERK", OracleType.NVarChar).Value = dwData["ARRWERK"].ToString(); 
          or1.Parameters.Add("ARRABT", OracleType.NVarChar).Value = dwData["ARRABT"].ToString(); 
          or1.Parameters.Add("ARRWAKZ", OracleType.NVarChar).Value = dwData["ARRWAKZ"].ToString(); 
          or1.Parameters.Add("ARRART", OracleType.NVarChar).Value = dwData["ARRART"].ToString(); 
          or1.Parameters.Add("ARRVAR", OracleType.NVarChar).Value = dwData["ARRVAR"].ToString(); 
          or1.Parameters.Add("ARRFARBE", OracleType.NVarChar).Value = dwData["ARRFARBE"].ToString(); 
          or1.Parameters.Add("ARRLIART1", OracleType.NVarChar).Value = dwData["ARRLIART1"].ToString(); 
          or1.Parameters.Add("ARRDELTAE1", OracleType.NVarChar).Value = dwData["ARRDELTAE1"].ToString(); 
          or1.Parameters.Add("ARRDELTAL1", OracleType.NVarChar).Value = dwData["ARRDELTAL1"].ToString(); 
          or1.Parameters.Add("ARRDELTAA1", OracleType.NVarChar).Value = dwData["ARRDELTAA1"].ToString(); 
          or1.Parameters.Add("ARRDELTAB1", OracleType.NVarChar).Value = dwData["ARRDELTAB1"].ToString(); 
          or1.Parameters.Add("ARRDELTAC1", OracleType.NVarChar).Value = dwData["ARRDELTAC1"].ToString(); 
          or1.Parameters.Add("ARRDELTAH1", OracleType.NVarChar).Value = dwData["ARRDELTAH1"].ToString(); 
          or1.Parameters.Add("ARRLIART2", OracleType.NVarChar).Value = dwData["ARRLIART2"].ToString(); 
          or1.Parameters.Add("ARRDELTAE2", OracleType.NVarChar).Value = dwData["ARRDELTAE2"].ToString(); 
          or1.Parameters.Add("ARRDELTAL2", OracleType.NVarChar).Value = dwData["ARRDELTAL2"].ToString(); 
          or1.Parameters.Add("ARRDELTAA2", OracleType.NVarChar).Value = dwData["ARRDELTAA2"].ToString(); 
          or1.Parameters.Add("ARRDELTAB2", OracleType.NVarChar).Value = dwData["ARRDELTAB2"].ToString(); 
          or1.Parameters.Add("ARRDELTAC2", OracleType.NVarChar).Value = dwData["ARRDELTAC2"].ToString(); 
          or1.Parameters.Add("ARRDELTAH2", OracleType.NVarChar).Value = dwData["ARRDELTAH2"].ToString(); 
          or1.Parameters.Add("ARRLIART3", OracleType.NVarChar).Value = dwData["ARRLIART3"].ToString(); 
          or1.Parameters.Add("ARRDELTAE3", OracleType.NVarChar).Value = dwData["ARRDELTAE3"].ToString(); 
          or1.Parameters.Add("ARRDELTAL3", OracleType.NVarChar).Value = dwData["ARRDELTAL3"].ToString(); 
          or1.Parameters.Add("ARRDELTAA3", OracleType.NVarChar).Value = dwData["ARRDELTAA3"].ToString(); 
          or1.Parameters.Add("ARRDELTAB3", OracleType.NVarChar).Value = dwData["ARRDELTAB3"].ToString(); 
          or1.Parameters.Add("ARRDELTAC3", OracleType.NVarChar).Value = dwData["ARRDELTAC3"].ToString(); 
          or1.Parameters.Add("ARRDELTAH3", OracleType.NVarChar).Value = dwData["ARRDELTAH3"].ToString(); 
          or1.Parameters.Add("ARRLIART4", OracleType.NVarChar).Value = dwData["ARRLIART4"].ToString(); 
          or1.Parameters.Add("ARRDELTAE4", OracleType.NVarChar).Value = dwData["ARRDELTAE4"].ToString(); 
          or1.Parameters.Add("ARRDELTAL4", OracleType.NVarChar).Value = dwData["ARRDELTAL4"].ToString(); 
          or1.Parameters.Add("ARRDELTAA4", OracleType.NVarChar).Value = dwData["ARRDELTAA4"].ToString(); 
          or1.Parameters.Add("ARRDELTAB4", OracleType.NVarChar).Value = dwData["ARRDELTAB4"].ToString(); 
          or1.Parameters.Add("ARRDELTAC4", OracleType.NVarChar).Value = dwData["ARRDELTAC4"].ToString(); 
          or1.Parameters.Add("ARRDELTAH4", OracleType.NVarChar).Value = dwData["ARRDELTAH4"].ToString(); 
          or1.Parameters.Add("ARRREMV400", OracleType.NVarChar).Value = dwData["ARRREMV400"].ToString(); 
          or1.Parameters.Add("ARRREMV410", OracleType.NVarChar).Value = dwData["ARRREMV410"].ToString(); 
          or1.Parameters.Add("ARRREMV420", OracleType.NVarChar).Value = dwData["ARRREMV420"].ToString(); 
          or1.Parameters.Add("ARRREMV430", OracleType.NVarChar).Value = dwData["ARRREMV430"].ToString(); 
          or1.Parameters.Add("ARRREMV440", OracleType.NVarChar).Value = dwData["ARRREMV440"].ToString(); 
          or1.Parameters.Add("ARRREMV450", OracleType.NVarChar).Value = dwData["ARRREMV450"].ToString(); 
          or1.Parameters.Add("ARRREMV460", OracleType.NVarChar).Value = dwData["ARRREMV460"].ToString(); 
          or1.Parameters.Add("ARRREMV470", OracleType.NVarChar).Value = dwData["ARRREMV470"].ToString(); 
          or1.Parameters.Add("ARRREMV480", OracleType.NVarChar).Value = dwData["ARRREMV480"].ToString(); 
          or1.Parameters.Add("ARRREMV490", OracleType.NVarChar).Value = dwData["ARRREMV490"].ToString(); 
          or1.Parameters.Add("ARRREMV500", OracleType.NVarChar).Value = dwData["ARRREMV500"].ToString(); 
          or1.Parameters.Add("ARRREMV510", OracleType.NVarChar).Value = dwData["ARRREMV510"].ToString(); 
          or1.Parameters.Add("ARRREMV520", OracleType.NVarChar).Value = dwData["ARRREMV520"].ToString(); 
          or1.Parameters.Add("ARRREMV530", OracleType.NVarChar).Value = dwData["ARRREMV530"].ToString(); 
          or1.Parameters.Add("ARRREMV540", OracleType.NVarChar).Value = dwData["ARRREMV540"].ToString(); 
          or1.Parameters.Add("ARRREMV550", OracleType.NVarChar).Value = dwData["ARRREMV550"].ToString(); 
          or1.Parameters.Add("ARRREMV560", OracleType.NVarChar).Value = dwData["ARRREMV560"].ToString(); 
          or1.Parameters.Add("ARRREMV570", OracleType.NVarChar).Value = dwData["ARRREMV570"].ToString(); 
          or1.Parameters.Add("ARRREMV580", OracleType.NVarChar).Value = dwData["ARRREMV580"].ToString(); 
          or1.Parameters.Add("ARRREMV590", OracleType.NVarChar).Value = dwData["ARRREMV590"].ToString(); 
          or1.Parameters.Add("ARRREMV600", OracleType.NVarChar).Value = dwData["ARRREMV600"].ToString(); 
          or1.Parameters.Add("ARRREMV610", OracleType.NVarChar).Value = dwData["ARRREMV610"].ToString(); 
          or1.Parameters.Add("ARRREMV620", OracleType.NVarChar).Value = dwData["ARRREMV620"].ToString(); 
          or1.Parameters.Add("ARRREMV630", OracleType.NVarChar).Value = dwData["ARRREMV630"].ToString(); 
          or1.Parameters.Add("ARRREMV640", OracleType.NVarChar).Value = dwData["ARRREMV640"].ToString(); 
          or1.Parameters.Add("ARRREMV650", OracleType.NVarChar).Value = dwData["ARRREMV650"].ToString(); 
          or1.Parameters.Add("ARRREMV660", OracleType.NVarChar).Value = dwData["ARRREMV660"].ToString(); 
          or1.Parameters.Add("ARRREMV670", OracleType.NVarChar).Value = dwData["ARRREMV670"].ToString(); 
          or1.Parameters.Add("ARRREMV680", OracleType.NVarChar).Value = dwData["ARRREMV680"].ToString(); 
          or1.Parameters.Add("ARRREMV690", OracleType.NVarChar).Value = dwData["ARRREMV690"].ToString(); 
          or1.Parameters.Add("ARRREMV700", OracleType.NVarChar).Value = dwData["ARRREMV700"].ToString(); 
          or1.Parameters.Add("ARRFILLER", OracleType.NVarChar).Value = dwData["ARRFILLER"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
